package a.j.a;

import a.c.e;
import a.c.q;
import a.d.t;
import a.j.*;
import a.j.g;
import a.j.s;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;

public class h
  implements md.t_, md.m_, md.i_, md.l_
{
  public static final String a = "y.view.hierarchy.GroupNodePainter.GROUP_STATE_STYLE";
  private static final jg b = new n().w();
  private boolean c;
  private jg d;
  private boolean e = true;
  private Icon f = o.bb;
  private Icon g = o.cb;
  private final md.t_ h;
  public static int i;
  
  public h()
  {
    this(new s());
  }
  
  public h(md.t_ paramt_)
  {
    this.h = paramt_;
  }
  
  public md.t_ a()
  {
    return this.h;
  }
  
  public void a(ld paramld, Graphics2D paramGraphics2D)
  {
    int j = j.v;
    this.h.a(paramld, paramGraphics2D);
    if (j == 0)
    {
      if ((paramld instanceof f)) {
        if (j == 0)
        {
          if (((f)paramld).h()) {
            if (j != 0) {
              break label60;
            }
          }
        }
        else if (this.c) {
          c(paramld, paramGraphics2D);
        }
      }
      label60:
      a(paramld, paramGraphics2D, false);
    }
  }
  
  public void b(ld paramld, Graphics2D paramGraphics2D)
  {
    this.h.b(paramld, paramGraphics2D);
    a(paramld, paramGraphics2D, true);
  }
  
  protected void a(ld paramld, Graphics2D paramGraphics2D, boolean paramBoolean)
  {
    int m = j.v;
    synchronized (this)
    {
      if (m == 0) {
        if (!kg.r.equals(paramGraphics2D.getRenderingHint(kg.o)))
        {
          float f1 = b(paramld);
          if (m == 0) {
            if (f1 >= 1.0F)
            {
              d(paramld).a(paramGraphics2D);
              if (m != 0) {
                return;
              }
            }
          }
          if ((j.u) && (f1 > 0.0F))
          {
            jg localjg = d(paramld);
            t localt = localjg.c();
            int j = (int)Math.ceil(localt.d + localt.a) - (int)Math.floor(localt.d);
            int k = (int)Math.ceil(localt.e + localt.b) - (int)Math.floor(localt.e);
            BufferedImage localBufferedImage = new BufferedImage(j, k, 2);
            Graphics2D localGraphics2D = localBufferedImage.createGraphics();
            localGraphics2D.translate(-localt.d, -localt.e);
            localjg.a(localGraphics2D);
            localGraphics2D.dispose();
            Composite localComposite = paramGraphics2D.getComposite();
            AffineTransform localAffineTransform = paramGraphics2D.getTransform();
            paramGraphics2D.translate(localt.d, localt.e);
            paramGraphics2D.setComposite(AlphaComposite.getInstance(3, f1));
            paramGraphics2D.drawImage(localBufferedImage, 0, 0, null);
            paramGraphics2D.setTransform(localAffineTransform);
            paramGraphics2D.setComposite(localComposite);
          }
        }
      }
    }
  }
  
  protected float b(ld paramld)
  {
    int j = j.v;
    if ((j != 0) || ((paramld instanceof md)))
    {
      Object localObject = ((md)paramld).c("y.view.hierarchy.GroupNodePainter.GROUP_STATE_STYLE");
      if ((j != 0) || ((localObject instanceof a_))) {
        return ((a_)localObject).a();
      }
    }
    return 1.0F;
  }
  
  protected void c(ld paramld, Graphics2D paramGraphics2D)
  {
    int j = j.v;
    boolean bool = j.u;
    e locale = paramld.n();
    j localj = a(locale.g());
    if (j == 0) {
      if (localj == null) {
        return;
      }
    }
    if (j == 0) {
      if (!localj.l(locale)) {
        return;
      }
    }
    g localg = (g)localj.o(locale);
    a.d.u localu = c(paramld);
    double d1 = paramld.d() - localu.b - localu.d;
    double d2 = paramld.c() - localu.c - localu.e;
    double d3 = paramld.a() + localu.c + 0.5D * d2;
    double d4 = paramld.b() + localu.b + 0.5D * d1;
    if (j == 0) {
      if (paramld.x() > 0)
      {
        localObject = paramld.w();
        if (j != 0) {
          break label453;
        }
        if (((jg)localObject).B())
        {
          if (j != 0) {
            break label453;
          }
          switch (((jg)localObject).D())
          {
          case 1: 
            if (j == 0) {}
            switch (((jg)localObject).C())
            {
            case 102: 
            case 117: 
            case 118: 
              d1 -= ((jg)localObject).T();
              d4 += ((jg)localObject).T() / 2.0D;
              if (j == 0) {
                if (!bool) {
                  break;
                }
              }
              break;
            case 101: 
            case 119: 
            case 120: 
              d1 -= ((jg)localObject).T();
              d4 -= ((jg)localObject).T() / 2.0D;
              if (j == 0) {
                if (!bool) {
                  break;
                }
              }
              break;
            case 115: 
              d2 -= ((jg)localObject).S();
              d3 += ((jg)localObject).S() / 2.0D;
              if (j == 0) {
                if (!bool) {
                  break;
                }
              }
              break;
            case 116: 
              d2 -= ((jg)localObject).S();
              d3 -= ((jg)localObject).S() / 2.0D;
              if ((j == 0) && (bool)) {
                break;
              }
            }
            break;
          }
        }
      }
    }
    label453:
    if ((j != 0) || ((d2 <= 5.0D) || (d1 <= 5.0D))) {
      return;
    }
    Object localObject = paramGraphics2D.getTransform();
    paramGraphics2D.translate(d3, d4);
    Rectangle localRectangle = localg.d();
    double d5 = d2 / localRectangle.getWidth();
    double d6 = d1 / localRectangle.getHeight();
    double d7 = Math.min(d5, d6);
    paramGraphics2D.scale(d7, d7);
    paramGraphics2D.translate(-localRectangle.getCenterX(), -localRectangle.getCenterY());
    double d8 = d7 * ((AffineTransform)localObject).getScaleX();
    Double localDouble = (Double)paramGraphics2D.getRenderingHint(kg.y);
    mb localmb = new mb();
    if (j == 0)
    {
      if (localDouble != null)
      {
        if (j != 0) {
          break label632;
        }
        if (d8 <= localDouble.doubleValue()) {}
      }
      else
      {
        localmb.a(paramGraphics2D, localg);
      }
    }
    else if (j != 0) {
      return;
    }
    if ((bool) && (4.0D * d8 > localDouble.doubleValue())) {
      label632:
      localmb.b(paramGraphics2D, localg);
    }
    paramGraphics2D.setTransform((AffineTransform)localObject);
  }
  
  protected a.d.u c(ld paramld)
  {
    if ((j.v != 0) || ((paramld instanceof f))) {
      return ((f)paramld).i();
    }
    return new a.d.u(15.0D, 15.0D, 15.0D, 15.0D);
  }
  
  public Icon b()
  {
    return this.f;
  }
  
  public void a(Icon paramIcon)
  {
    this.f = paramIcon;
  }
  
  public Icon c()
  {
    return this.g;
  }
  
  public void b(Icon paramIcon)
  {
    this.g = paramIcon;
  }
  
  public void a(boolean paramBoolean)
  {
    this.e = paramBoolean;
  }
  
  public boolean d()
  {
    return this.e;
  }
  
  protected jg d(ld paramld)
  {
    int j = j.v;
    boolean bool = j.u;
    if (j == 0) {
      if (this.d == null)
      {
        this.d = new jg();
        this.d.d((byte)117);
        this.d.f(1.0D);
      }
    }
    if (j == 0)
    {
      this.d.a(null);
      if ((paramld instanceof f))
      {
        if (((f)paramld).h())
        {
          if (j != 0) {
            break label186;
          }
          if (this.d.z() == this.f) {
            break label174;
          }
          this.d.a(this.f);
          if (j != 0) {
            break label182;
          }
          if (!bool) {
            break label174;
          }
        }
        if (j != 0) {
          break label186;
        }
        if (this.d.z() == this.g) {
          break label174;
        }
        this.d.a(this.g);
        if (j != 0) {
          break label182;
        }
        if (!bool) {
          break label174;
        }
      }
    }
    if (j == 0)
    {
      if (this.d.z() != null) {
        this.d.a(null);
      }
      label174:
      this.d.a(paramld);
    }
    label182:
    label186:
    return this.d;
  }
  
  protected j a(q paramq)
  {
    return j.a(paramq);
  }
  
  public boolean e()
  {
    return this.c;
  }
  
  public void b(boolean paramBoolean)
  {
    this.c = paramBoolean;
  }
  
  public dd a(ld paramld, pg parampg, double paramDouble1, double paramDouble2, sc paramsc)
  {
    if ((j.v != 0) || ((paramld instanceof n)))
    {
      if (d(paramld).b(paramDouble1, paramDouble2)) {
        new c_(paramld, parampg)
        {
          protected boolean a(ld paramAnonymousld, double paramAnonymousDouble1, double paramAnonymousDouble2)
          {
            return h.this.d(paramAnonymousld).b(paramAnonymousDouble1, paramAnonymousDouble2);
          }
        };
      }
      return null;
    }
    return null;
  }
  
  public void a(ld paramld)
  {
    if ((j.v != 0) || ((paramld instanceof n)))
    {
      n localn = (n)paramld;
      jg localjg = localn.w();
      if ((localjg != null) && (a(localjg)))
      {
        localjg.d((byte)102);
        localjg.a(16);
        localjg.b(Color.darkGray);
        localjg.a(Color.white);
        localjg.f((byte)2);
        localjg.g((byte)1);
        localjg.f(0.0D);
      }
    }
  }
  
  private boolean a(jg paramjg)
  {
    int j = j.v;
    if (j == 0) {}
    boolean bool = b.M() == paramjg.M();
    if (j == 0) {}
    bool &= b.Z() == paramjg.Z();
    bool &= a(b.F(), paramjg.F(), false);
    bool &= a(b.c(), paramjg.c(), false);
    bool &= a(b.Y(), paramjg.Y(), false);
    if (j == 0) {}
    bool &= b.k() == paramjg.k();
    if (j == 0) {}
    bool &= b.g() == paramjg.g();
    if (j == 0) {}
    bool &= b.cb() == paramjg.cb();
    bool &= a(b.U(), paramjg.U(), false);
    if (j == 0) {}
    bool &= b.T() == paramjg.T();
    if (j == 0) {}
    bool &= b.u() == paramjg.u();
    bool &= a(b.z(), paramjg.z(), false);
    bool &= a(b.R(), paramjg.R(), false);
    if (j == 0) {}
    bool &= b.v() == paramjg.v();
    bool &= a(b.y(), paramjg.y(), false);
    bool &= a(b.a(), paramjg.a(), true);
    bool &= a(b.G(), paramjg.G(), false);
    if (j == 0) {}
    bool &= b.D() == paramjg.D();
    bool &= a(b.e(), paramjg.e(), true);
    bool &= a(b.I(), paramjg.I(), false);
    if (j == 0) {}
    bool &= b.C() == paramjg.C();
    if (j == 0) {}
    bool &= b.x() == paramjg.x();
    bool &= a(b.H(), paramjg.H(), false);
    bool &= a(b.A(), paramjg.A(), false);
    bool &= a(b.P(), paramjg.P(), false);
    bool &= a(b.f(), paramjg.f(), true);
    if (j == 0) {}
    bool &= b.t() == paramjg.t();
    if (j == 0) {}
    bool &= b.S() == paramjg.S();
    return bool;
  }
  
  private static boolean a(Object paramObject1, Object paramObject2, boolean paramBoolean)
  {
    int j = j.v;
    if (paramBoolean)
    {
      if (j == 0) {
        if (paramObject1 != null) {
          paramObject1 = paramObject1.getClass();
        }
      }
      if (j != 0) {
        break label35;
      }
      if (paramObject2 != null) {
        paramObject2 = paramObject2.getClass();
      }
    }
    label35:
    if ((j != 0) || (paramObject1 != paramObject2))
    {
      if ((j == 0) && (paramObject1 == null)) {
        break label67;
      }
      if (j != 0) {
        break label64;
      }
    }
    label64:
    label67:
    return paramObject1.equals(paramObject2);
  }
  
  public boolean a(ld paramld, double paramDouble1, double paramDouble2)
  {
    int j = j.v;
    if (j == 0) {
      if ((this.h instanceof md.l_))
      {
        if (j != 0) {
          break label120;
        }
        if (!((md.l_)this.h).a(paramld, paramDouble1, paramDouble2)) {
          break label116;
        }
        return true;
      }
    }
    if (j == 0) {
      if (paramDouble1 >= paramld.a())
      {
        if (j != 0) {
          break label120;
        }
        if (paramDouble1 <= paramld.a() + paramld.c())
        {
          if (j != 0) {
            break label120;
          }
          if (paramDouble2 >= paramld.b())
          {
            if (j != 0) {
              break label120;
            }
            if (paramDouble2 <= paramld.b() + paramld.d()) {
              return true;
            }
          }
        }
      }
    }
    label116:
    label120:
    if (j == 0) {
      if (paramld.x() > 0)
      {
        if (j != 0) {
          break label149;
        }
        if (paramld.w().b(paramDouble1, paramDouble2)) {
          return true;
        }
      }
    }
    label149:
    return false;
  }
  
  public static abstract class c_
    extends a.j.u
  {
    private final ld e;
    private final pg f;
    public static int g;
    
    protected c_(ld paramld, pg parampg)
    {
      this.e = paramld;
      this.f = parampg;
    }
    
    public boolean a(ng paramng)
    {
      return a(this.e, paramng.a(), paramng.b());
    }
    
    public void b(ng paramng)
    {
      int j = j.v;
      if (j == 0) {
        if (!a(this.e, paramng.a(), paramng.b()))
        {
          d();
          return;
        }
      }
      if (paramng.c() == 500)
      {
        e locale = this.e.n();
        if (((j == 0) && (locale == null)) || (locale.g() == null)) {
          return;
        }
        j localj = j.a(this.f.a());
        if (((j != 0) || (localj != null)) && ((j != 0) || (localj.e(locale.g()))))
        {
          int i = 0;
          if (j == 0) {
            if (localj.l(locale))
            {
              a(locale, localj);
              i = 1;
              if (j != 0) {
                break label165;
              }
              if (!j.u) {
                break label163;
              }
            }
          }
          if (j == 0) {
            if (localj.m(locale))
            {
              b(locale, localj);
              i = 1;
            }
          }
          label163:
          if (i != 0) {
            label165:
            d();
          }
        }
      }
    }
    
    protected abstract boolean a(ld paramld, double paramDouble1, double paramDouble2);
    
    protected void a(e parame, j paramj)
    {
      a(parame, lc.E, this.f);
    }
    
    protected void b(e parame, j paramj)
    {
      a(parame, lc.F, this.f);
    }
    
    private static void a(e parame, Object paramObject, pg parampg)
    {
      Action localAction = a(paramObject, parampg);
      if (localAction != null)
      {
        if (parame != null)
        {
          g localg = parampg.a();
          localg.V();
          localg.a(parame, true);
        }
        localAction.actionPerformed(new ActionEvent(parampg, 1001, ""));
      }
    }
    
    private static Action a(Object paramObject, pg parampg)
    {
      int i = j.v;
      ActionMap localActionMap = parampg.B().getActionMap();
      if (i == 0) {
        if (localActionMap != null)
        {
          Action localAction = localActionMap.get(paramObject);
          if (i != 0) {
            break label54;
          }
          if (localAction != null) {
            return localAction;
          }
        }
      }
      label54:
      return new lc(parampg).db().get(paramObject);
    }
  }
  
  public static final class a_
  {
    private float a;
    public static boolean b;
    
    public float a()
    {
      return this.a;
    }
    
    public void a(float paramFloat)
    {
      int i = j.v;
      boolean bool = j.u;
      if (i == 0) {
        if (paramFloat < 0.0F)
        {
          this.a = 0.0F;
          if ((i == 0) && (!bool)) {
            return;
          }
        }
      }
      if (i == 0)
      {
        if (paramFloat > 1.0F)
        {
          if (i != 0) {
            break label56;
          }
          this.a = 1.0F;
        }
      }
      else if (!bool) {
        return;
      }
      label56:
      this.a = paramFloat;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.a.h

 * JD-Core Version:    0.7.0.1

 */